let requestData = require ('./RequestData')
    , Logger    = {};
Logger.create = function ( logger, format )
{
    return function ( req, res, next )
    {
        let buffers = [];
        req.on ('data', function ( trunk )
        {
            buffers.push (trunk);
        });
        req.on ('end', function ()
        {
            let xml = Buffer.concat (buffers).toString ('utf-8');
            let data = requestData.getData (req);
            data.location = "RequestLogger.js";
            logger.info (data);
        });
        next ();
    };
};
module.exports = Logger;
